package com.eckey.lab.service.impl;

import com.alibaba.fastjson.JSON;
import com.eckey.lab.entity.Log;
import com.eckey.lab.mapper.LogServiceMapper;
import com.eckey.lab.service.LogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Slf4j
@Service("logService")
public class LogServiceImpl implements LogService {

    @Resource
    private LogServiceMapper logServiceMapper;

    @Override
    public void insert(Log systemLog) {
        logServiceMapper.insert(systemLog);
        log.info("插入数据成功：{}", JSON.toJSONString(systemLog));
    }
}
